<template>
  <web-view :src="url"></web-view>
</template>

<script>
const officeServerUrl = `https://view.officeapps.live.com/op/embed.aspx?src=`;
export default {
  data() {
    return {
      url: "",
    };
  },
  onLoad(option) {
    let url = option.url;
    if (option.type == 1) {
      url = officeServerUrl + option.url;
    }
    this.url = decodeURIComponent(url);
  },
};
</script>

<style></style>
